<%@ page language="java" contentType="text/html; charset=UTF-8"
    import="ecs.dogear.app.*"
    pageEncoding="UTF-8"%>
<%
    int commentId = Integer.parseInt(request.getParameter("commentId"));
    int userId = Integer.parseInt(request.getParameter("userId"));
    String commentStr = StringUtil.parse(request.getParameter("content"));
    int i = 1;
    while(CommenterDatabase.getComment(i) != null) i++;
    AddReplyTransaction art = new AddReplyTransaction(userId,i,commentStr,commentId);
    art.execute();
    String handler = request.getParameter("callback");
    out.println(handler + "({replyId:'"+i+"'})");
%>